home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-30 | 1.3 KB | 53 lines | [TEXT/SPM ] |
- /* mac06©1998 by HNS/DSITRI hns@computer.org
- ** sys/ptrace.h
- */
-
- #pragma once
- #include "sys/types.h"
-
- #define PTRACE_TRACEME 0
- #define PTRACE_MODEL 1
- #define PTRACE_ATTACH 2
- #define PTRACE_DETACH 3
- #define PTRACE_KILL 4
- #define PTRACE_CONT 5
- #define PTRACE_SYSCALL 6
- #define PTRACE_SINGLESTEP 7
- #define PTRACE_PEEK 8
- #define PTRACE_PEEKTEXT PTRACE_PEEK
- #define PTRACE_PEEKDATA PTRACE_PEEK
- #define PTRACE_PEEKUSR PTRACE_PEEK
- #define PTRACE_POKE 9
- #define PTRACE_POKETEXT PTRACE_POKE
- #define PTRACE_POKEDATA PTRACE_POKE
- #define PTRACE_POKEUSR PTRACE_POKE
- #define PTRACE_PEEKBLK 10
- #define PTRACE_POKEBLK 11
- #define PTRACE_PEEKREG 12
- #define PTRACE_POKEREG 13
- #define PTRACE_REGNAME 14 /* pass char name[*data] */
- /* set/reset breakpoints */
-
- struct ptrace_blk
- { /* pass as addr parameter */
- void *addr;
- long len;
- };
-
- struct ptrace_model
- { /* pass as addr parameter */
- int addrsize; /* in bit */
- int maxdatasize; /* in bit */
- int numreg; /* total number of registers */
- short flags; /* little or bigendian, ... */
- #define PTRACE_BIGENDIAN 0x0001
- #define PTRACE_LITTLEENDIAN 0x0002
- /* stack growth direction */
- /* has flag registers */
- /* which one is PC, SP */
- char model[8]; /* processor model */
- };
-
- int ptrace(int req, pid_t pid, void *addr, unsigned long *data);
-
- /* EOF */